# Simple Dockerfile for simple-node-app
# Uses a small Node image and copies only necessary files

FROM node:18-alpine

WORKDIR /app

# copy package files first to leverage Docker cache
COPY package.json package-lock.json* ./

RUN npm ci --only=production --no-audit --progress=false || npm install --production

# copy app sources
COPY index.js cli.js README.md ./

EXPOSE 3000

CMD ["node", "index.js"]
